package com.study.pojo;

import java.util.Objects;

/**
 * @PackgeName: com.study.pojo
 * @ClassName: SysRole
 * @Author: 严志祥
 * Date: 2022-05-23 16:46
 * project name: MyBatis-01
 * @Version:
 * @Description:
 */
public class SysRole {
    private Integer roleId;
    private String roleCode;
    private String roleName;

    public SysRole() {
    }

    public SysRole(Integer roleId, String roleCode, String roleName) {
        this.roleId = roleId;
        this.roleCode = roleCode;
        this.roleName = roleName;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysRole sysRole = (SysRole) o;
        return Objects.equals(roleId, sysRole.roleId) && Objects.equals(roleCode, sysRole.roleCode) && Objects.equals(roleName, sysRole.roleName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleId, roleCode, roleName);
    }

    @Override
    public String toString() {
        return "SysRole{" +
                "roleId=" + roleId +
                ", roleCode='" + roleCode + '\'' +
                ", roleName='" + roleName + '\'' +
                '}';
    }
}
